# -*- coding: utf-8 -*-

from django.conf.urls.defaults import *

from piston.authentication import HttpBasicAuthentication
from piston.resource import Resource

from fluffycentral.api.handlers import *

sp_list_handler = Resource(SPListHandler)
sp_list_handler.csrf_exempt = getattr(sp_list_handler.handler, 'csrf_exempt', True)
file_list_handler = Resource(FileListHandler)
file_list_handler.csrf_exempt = getattr(file_list_handler.handler, 'csrf_exempt', True)
make_cert_handler = Resource(MakeCertHandler)
make_cert_handler.csrf_exempt = getattr(make_cert_handler.handler, 'csrf_exempt', True)

urlpatterns = patterns('',
    url(r'sp_list/$', sp_list_handler, name='sp_list'),
    url(r'file_list/$', file_list_handler, name='file_list'),
    url(r'make_cert/$', make_cert_handler, name='make_cert'),
    #url(r'get_pub_key/$', get_pub_key_handler, name='get_pub_key'),
    #url(r'get_sp_pub_key/$', get_sp_pub_key_handler, name='get_sp_pub_key'),
)
